From: Giovanni Campagna Date: Mon, 19 Nov 2012 17:59:39 +0000 (+0100) Subject: MessageTray: restore opacity when expanding a notification X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5409 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b121c2518403bc5ea991b3f1c4b00188c8d590b4;p=gnome-shell.git MessageTray: restore opacity when expanding a notification MessageTray tweens both opacity and y to hide or show _notificationWidget, but only y when expanding it. This means that an existing tween to hide the notification will continue running, clearing the notification state. If the hiding one completes before the showing one, the onComplete handler will throw an exception (because the notification was nullified) and therefore break the state tracking. https://bugzilla.gnome.org/show_bug.cgi?id=683986 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 50fd3b4ea..d69d31b9b 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -2403,8 +2403,13 @@ const MessageTray = new Lang.Class({ if (this._notificationWidget.y < expandedY) { this._notificationWidget.y = expandedY; } else if (this._notification.y != expandedY) { + // Tween also opacity here, to override a possible tween that's + // currently hiding the notification. This will ensure that the + // notification is not removed when the onComplete handler for this + // one triggers. this._tween(this._notificationWidget, '_notificationState', State.SHOWN, { y: expandedY, + opacity: 255, time: ANIMATION_TIME, transition: 'easeOutQuad' });